package com.example.qu_tao.entity;

import java.util.List;

public class Post {
    private int postId;
    private int userId;
    private String username;
    private String content;
    private int postType; // 0-动态 1-文章
    private String createTime;
    private List<byte[]> images; // 图片数据
    private boolean isLiked; // 点赞状态
    private int likeCount; // 点赞数量

    // 构造函数
    public Post() {}

    public Post(int postId, int userId, String username, String content, int postType, String createTime) {
        this.postId = postId;
        this.userId = userId;
        this.username = username;
        this.content = content;
        this.postType = postType;
        this.createTime = createTime;
        this.isLiked = false;
        this.likeCount = 0;
    }

    // Getter和Setter方法
    public int getPostId() {
        return postId;
    }

    public void setPostId(int postId) {
        this.postId = postId;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getPostType() {
        return postType;
    }

    public void setPostType(int postType) {
        this.postType = postType;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public List<byte[]> getImages() {
        return images;
    }

    public void setImages(List<byte[]> images) {
        this.images = images;
    }

    public boolean isLiked() {
        return isLiked;
    }

    public void setLiked(boolean liked) {
        isLiked = liked;
    }

    public int getLikeCount() {
        return likeCount;
    }

    public void setLikeCount(int likeCount) {
        this.likeCount = likeCount;
    }
}